#pragma once

#include <core/types.h>


int GkInitHeap(unsigned long start, unsigned long end);

void *malloc(ULONG size);

void free(void *p);

void *kzalloc(ULONG, int);

void *DmaMemAlloc(size_t len, ULONG *ulPhyAddr);


#define SAFE_FREE(p) \
	do \
	{  \
		free(p); \
		p = NULL; \
	} while (0)


#define GFP_KERNEL 0

#define kmalloc(sz, flag)  malloc(sz)
#define kfree              free
#define zalloc(sz)         kzalloc(sz, GFP_KERNEL)

